1. Technical Field
The present invention relates in general to object-oriented computer systems. More specifically, the present invention relates to the field of distributed object systems.
2. Background Art
The development of the EDVAC computer system of 1948 is often cited as the beginning of the computer era. Since that time, computer systems have evolved into extremely sophisticated devices that may be found in many different settings. Computer systems typically include a combination of hardware (e.g., semiconductors, circuit boards, etc.) and software (e.g., computer programs). As advances in semiconductor processing and computer architecture push the performance of the computer hardware higher, more sophisticated computer software has evolved to take advantage of the higher performance of the hardware, resulting in computer systems today that are much more powerful than just a few years ago.
Other changes in technology have also profoundly affected how we use computers. For example, the widespread proliferation of computers prompted the development of computer networks that allow computers to communicate with each other. With the introduction of the personal computer (PC), computing became accessible to large numbers of people. Networks for personal computers were developed to allow individual users to communicate with each other. In this manner, a large number of people within a company could communicate at the same time with a software application running on one computer system.
The computer programs that run on modern computer systems are typically extremely complex. The execution of these modem computer programs is typically broken into sub-groups, called processes or tasks. Each process is generally assigned its own address space, such that different processes can operate concurrently without conflicts in resources. Each process can include one or more threads of control, or "threads." Threads share the address space of their parent process. This allows multiple threads to be spun off by the parent process without requiring excessive system resources. For these reasons, a thread is often described as a "light process."
Object oriented programming based on an object model is a new way of programming computer programs that has become very popular over the past several years. Computer programs written in object-oriented languages are known as object-oriented programs. Object-oriented programming differs from traditional procedural programming in that it uses objects, instead of procedures, as its fundamental building blocks. In the object model, each object contains encapsulated data and methods used to access the encapsulated data.
Objects interact with each other through method calls. These method calls are implemented by threads. For example, for an object A to call a method on an object B, a thread first gets object A. While running within A's method the thread then gets object B and calls one of B's method. Thus, all parts of the interaction are performed by the same thread. This interaction is referred to as "A calls B."
Object systems that allow interactions between objects in remote locations over a communications link are commonly referred to as distributed object systems. Where object A resides in one location, and object B resides in another location, "A calls B" becomes a remote call. The object making the call (Object A) is generally referred to as a "client object" while the object receiving the call and performing the function (Object B) is generally referred to as a "server object." In a distributed system the client object and the server object are in remote locations and are running under different threads ("client thread" and "server thread" respectively). More specifically, when object A makes a remote call to object B the client thread is suspended and a server thread on the server side is chosen on behalf of the client thread to call B's method. When the call to object B is done the server thread is either discarded or returned to a pool for reuse, the result is then passed back to the client side, and the client thread is resumed with the result.
Thus, when A calls a remote B there is a transition of execution flow from the client thread to the server thread then back to the client thread. The client and server threads together perform what a single thread does in a non-remote "A calls B" scenerio.
The client object-server object interactions described above form the basis for the distributed object system. Different protocols have been proposed to facilitate these interactions. Unfortunately, many distributed object system protocols do not provide for seamless distributed computing to objects in applications that were not specifically designed to operate in a distributed environment. In particular, distributed system protocols may not take into account the need for particular thread assignment procedures.
In particular, current distributed system protocols assign server threads randomly from a pool of available threads. For example, a call from a client object to a remote server object may be performed by a thread (1). A later call from the client object to the server object may be performed by a thread (2). This randomness of thread assignment can lead to problems where the server application expects certain operations to be performed by the same thread. For example, a database application may require the same thread that opened the database to perform any action on the database. This restriction can help prevent security breaches into the system. However, this same restriction makes the database inaccessible through the distributed system.
Without a method and apparatus to provide consistent thread assignment in a distributed object system, interaction between remote distributed objects will not be possible in all types of applications.